import request from '@/utils/request'

// 查询台风列表
export function listTyphoon(query) {
  return request({
    url: '/manage/typhoon/list',
    method: 'get',
    params: query
  })
}

// 查询台风详细
export function getTyphoon(typhoonId) {
  return request({
    url: '/manage/typhoon/' + typhoonId,
    method: 'get'
  })
}

// 新增台风
export function addTyphoon(data) {
  return request({
    url: '/manage/typhoon',
    method: 'post',
    data: data
  })
}

// 修改台风
export function updateTyphoon(data) {
  return request({
    url: '/manage/typhoon',
    method: 'put',
    data: data
  })
}

// 删除台风
export function delTyphoon(typhoonId) {
  return request({
    url: '/manage/typhoon/' + typhoonId,
    method: 'delete'
  })
}
